<template>
  <div id="network">
    <!-- 过程图 -->
    <Mapping />
    <!-- 表格和趋势图 -->
    <div id="badge">
      <!-- 表格 -->
      <div class="badgeLeft">
        <div class="hear">
          <div class="record">
            <p>总用户数</p>
            <p v-if="statisticss.businesscount == 0">-</p>
            <p v-else>
              {{ statisticss.businesscount }}
            </p>
          </div>
          <div class="record">
            <p>附着成功率</p>
            <p v-if="statisticss.attch_ask_success_rate == null">-</p>
            <p v-else>{{ statisticss.attch_ask_success_rate }}%</p>
          </div>
          <div class="record">
            <p>PDP激活成功率</p>
            <p v-if="statisticss.pdp_ask_success_rate == null">-</p>
            <p v-else>{{ statisticss.pdp_ask_success_rate }}%</p>
          </div>
          <div class="record">
            <p>TCP成功率</p>
            <p v-if="statisticss.tcp23_success_rate == null">-</p>
            <p v-else>{{ statisticss.tcp23_success_rate }}%</p>
          </div>
          <div class="record">
            <p>HTTP成功率</p>
            <p v-if="statisticss.http_ask_success_rate == null">-</p>
            <p v-else>{{ statisticss.http_ask_success_rate }}%</p>
          </div>
          <div class="record">
            <p>TCP时延</p>
            <p v-if="statisticss.tcp_create_time == null || statisticss.tcp_suc_req_time == null">-</p>
            <p v-else>
              {{parseFloat(statisticss.tcp_create_time) +
                    parseFloat(statisticss.tcp_suc_req_time)}}ms</p>
          </div>
        </div>
        <BadgeLeft ref="transmit" @switch="Subculture" />
      </div>
      <div class="badgeRight">
        <ImgBox />
        <!-- 统计图 -->
        <div>
          <el-tabs v-model="activeName">
            <el-tab-pane
              v-for="(tab, index) in tabData"
              :key="index"
              :label="tab.name"
              :name="tab.id"
            >
              <div class="tabtitle">
                {{ tab.name }}-趋势图
                <div :id="tab.id"></div>
              </div>
            </el-tab-pane>
          </el-tabs>
        </div>
      </div>
    </div>
  </div>
</template>

<script src="./Network.js"></script>

<style lang="scss">
#network {
  height: 95vh;
  background-color: #eef1f9;
  .img_box {
    position: relative;
    right: 0.5vw;
    
    .el-table {
      width: 95% !important;
      &::before {
        background-color: transparent;
      }
    }
    .el-table__body {
      width: 100.05% !important;
    }
    .el-table th {
      color: black;
      background-color: #e7f7ff;
      border-bottom: 1px solid #e7f7ff;
    }
    .el-table td {
      color: black;
      border: 1px solid #ffffff;
      background-color: #ffffff;
    }
    .el-table__empty-block {
      height: 0 !important;
      background-color: #ffffff;
    }
    // 滚动条
    .el-table__body-wrapper::-webkit-scrollbar {
      width: 5px;
      height: 5px;
    }
    .el-table__body-wrapper::-webkit-scrollbar-thumb {
      background-color: #ddd;
      border-radius: 3px;
    }
    .current-row {
      background-color: #ECF5FF;
      td {
        background-color: transparent;
      }
    }
  }
  /*1.显示滚动条：当内容超出容器的时候，可以滚动。：*/
  .el-drawer__body {
    overflow: auto;
  }

  /*2.隐藏滚动条这里可以让右边的滚动条不显示*/
  .el-drawer__container ::-webkit-scrollbar {
    display: none;
  }
}
/* 表格和趋势图 */
#badge {
  width: 98vw;
  height: 53vh;
  margin: auto;
  padding: 1vw 1vh;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
}
.badgeLeft {
  width: 70vw;
  height: 55vh;
}
/* 标签 */
.badgeLeft .hear {
  width: 70vw;
  height: 8vh;
  padding-top: 2vh;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-around;
}
.hear .record {
  width: 10vw;
  height: 7vh;
  text-align: center;
  background: url("../../assets/image/Shape_copy1.png") no-repeat;
  background-size: 100% 100%;
}
.record p:nth-child(1) {
  padding: 0.2vh 0;
  font-size: 18px;
  font-family: Microsoft YaHei, Microsoft YaHei-Regular;
  font-weight: bold;
  border-bottom: 1px solid #0057ff;
}
.record p:nth-child(2) {
  font-size: 18px;
  height: 4vh;
  line-height: 4vh;
  font-family: Microsoft YaHei, Microsoft YaHei-Regular;
  font-weight: bold;
  text-align: center;
}
/* 表格 */
#badge .el-table {
  width: 70vw !important;
  height: 37vh !important;
}
#badge .el-table::before {
  background-color: transparent;
}

#badge .el-table__body {
  width: 70vw !important;
}
#badge .el-table th {
  color: black;
  background-color: #b7cdf5;
  border-bottom: 1px solid #b2c3e3;
}

#badge .el-table td {
  color: black;
  border: 1px solid #c2cbde;
  background-color: #eef1f9;
}
#badge .el-table__empty-block {
  height: 0 !important;
  background-color: #0095ff33;
}
#badge .el-table__empty-text {
  font-size: 18px;
}
/*滚动条的宽度*/
#badge .el-table__body-wrapper::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
/*滚动条滑块*/
#badge .el-table__body-wrapper::-webkit-scrollbar-thumb {
  background-color: #ddd;
  border-radius: 3px;
}
/* 分页按钮 */
.el-pagination {
  margin-top: 5px;
  padding: 2px 130px;
}
/* 右侧 */
.badgeRight {
  width: 27vw;
}
#badge .el-tabs__item {
  /* width: 5vw; */
  height: 5vh;
  text-align: center;
  font-size: 18px;
  padding: 0 10px !important;
  background: url("../../assets/image/shape11.png") no-repeat;
  background-size: 100% 100%;
}
#badge .el-tabs__nav-scroll {
  height: 42px;
}
#badge .el-tabs__active-bar,
#badge .el-tabs__nav-wrap::after {
  display: none;
}
#badge .el-tabs__item.is-active {
  color: white;
  background: url("../../assets/image/shape1.png") no-repeat;
  background-size: 100% 100%;
}
#badge .el-tabs__content {
  padding: 5px;
  height: 38vh;
  font-size: 16px;
  font-family: Microsoft YaHei, Microsoft YaHei-Regular;
  font-weight: bold;
}
#first,
#second,
#third,
#fourth,
#HTTP,
#TCP {
  width: 26vw;
  height: 35vh;
}
#badge .el-tabs__nav-prev {
  width: 1.1vw;
  text-align: center;
  border: 0;
  font-size: 20px;
}
#badge .el-tabs__nav-next {
  width: 1.1vw;
  text-align: center;
  border: 0;
  font-size: 20px;
}
#badge .el-input__inner {
  background-color: transparent;
}
#badge .el-pagination .btn-next,
.el-pagination .btn-prev,
.el-pager li {
  background-color: transparent;
}
#badge .el-pagination button:disabled {
  background-color: transparent;
}

#first,
#second,
#third,
#fourth,
#HTTP,
#TCP {
  margin-top: 5px;
  background-color: #edf1f9;
}
.import .el-input__inner::placeholder {
  color: #005185 !important;
}
.import .el-input__inner {
  width: 14vw;
  height: 4vh;
  padding-left: 3px;
  font-size: 16px;
  font-family: Microsoft YaHei, Microsoft YaHei-Regular;
  font-weight: 400;
  padding-left: 5px;
  background-color: transparent !important;
  border: 0 !important;
}
@media screen and (max-width: 1366px) {
  .network {
    height: 94vh;
  }
  /* 表格和趋势图 */
  #badge {
    width: 98vw;
    height: 53vh;
    margin: auto;
    padding: 1vw 1vh;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
  }
  .badgeLeft {
    width: 70vw;
    height: 55vh;
  }
  /* 标签 */
  .badgeLeft .hear {
    width: 70vw;
    height: 8vh;
    padding-top: 2vh;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-around;
  }
  #badge .el-table {
    width: 70vw !important;
    height: 35vh !important;
  }
  .hear .record {
    width: 10vw;
    height: 7vh;
    text-align: center;
    background: url("../../assets/image/Shape_copy1.png") no-repeat;
    background-size: 100% 100%;
  }
  .record p:nth-child(1) {
    padding: 0.2vh 0;
    font-size: 14px;
    font-family: Microsoft YaHei, Microsoft YaHei-Regular;
    font-weight: bold;
    border-bottom: 1px solid #0057ff;
  }
  .record p:nth-child(2) {
    font-size: 18px;
    height: 4vh;
    line-height: 4vh;
    font-family: Microsoft YaHei, Microsoft YaHei-Regular;
    font-weight: bold;
    text-align: center;
  }
  /* 表格 */
  #nationwide .el-table {
    width: 68vw;
  }
  #badge .el-table::before {
    background-color: transparent;
  }

  #badge .el-table__body {
    width: 70vw !important;
  }
  #badge .el-table th {
    color: black;
    background-color: #b7cdf5;
    border-bottom: 1px solid #b2c3e3;
  }

  #badge .el-table td {
    color: black;
    border: 1px solid #c2cbde;
    background-color: #eef1f9;
  }
  #badge .el-table__empty-block {
    height: 0 !important;
    background-color: #0095ff33;
  }
  #badge .el-table__empty-text {
    font-size: 18px;
  }
  /*滚动条的宽度*/
  #badge .el-table__body-wrapper::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }
  /*滚动条滑块*/
  #badge .el-table__body-wrapper::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
  }
  /* 分页按钮 */
  .el-pagination {
    margin-top: 5px;
    padding: 2px 130px;
  }
  /* 右侧 */
  .badgeRight {
    width: 27vw;
  }
  #badge .el-tabs__header {
    margin: 0;
  }
  #badge .el-tabs__item {
    /* width: 5vw; */
    height: 5vh;
    text-align: center;
    font-size: 14px;
    padding: 0 5px !important;
    background: url("../../assets/image/shape11.png") no-repeat;
    background-size: 100% 100%;
  }
  #badge .el-tabs__nav-scroll {
    height: 42px;
  }
  #badge .el-tabs__active-bar,
  #badge .el-tabs__nav-wrap::after {
    display: none;
  }
  #badge .el-tabs__item.is-active {
    color: black;
  }
  #badge .el-tabs__content {
    padding: 5px;
    height: 36vh;
    font-size: 16px;
    font-family: Microsoft YaHei, Microsoft YaHei-Regular;
    font-weight: bold;
  }
  #badge .el-tabs__nav-prev {
    width: 1.1vw;
    text-align: center;
    border: 0;
    font-size: 20px;
  }
  #badge .el-tabs__nav-next {
    width: 1.1vw;
    text-align: center;
    border: 0;
    font-size: 20px;
  }
  #first,
  #second,
  #third,
  #fourth,
  #HTTP,
  #TCP {
    width: 26vw;
    height: 35vh;
  }
  .import .el-input__inner::placeholder {
    color: #005185 !important;
  }
  .import .el-input__inner {
    width: 14vw;
    height: 4vh;
    padding-left: 3px;
    font-size: 16px;
    font-family: Microsoft YaHei, Microsoft YaHei-Regular;
    font-weight: 400;
    padding-left: 5px;
    background-color: transparent !important;
    border: 0 !important;
  }
}
</style>